Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: Arrays & Set Sizes

  1. #21

    Default

    oh yeah I know I ment map files I downloaded all of them from some site, they had a link to all that stuff, and what was funny when you click on link the main page was them raging on MMF clan ...lol
    Now in reborn I use stuffsrv instead of stufftext right?
    nvm I need to do this

    local.trig2 message "i tried to roof"

    local.player stufftext "stay off roofs" didn't work the trig mess is better any way only the player will see it .
    Last edited by easymeat; December 26th, 2014 at 06:21 PM. Reason: I'm Stupid didn'r search

  2. #22
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,566

    Default

    stufftext is basically forcing a player to write the command in his console

    if u type "stay off roofs" in console nothing will appear , SINCE MOHAA doesn't know a console command named stay , u can :

    a. change "stay off roofs" to "iprint stay off roofs 1"

    b. change local.player stufftext "stay off roofs" to local.player iprint "stay off roofs" 1

    there are other ways to do it like i huddraw or locationprint ,
    Last edited by RyBack; December 27th, 2014 at 05:02 AM.

  3. #23
    Developer Sor's Avatar
    Join Date
    Aug 2010
    Location
    The Medieval City of Bruges
    Posts
    747

    Default

    Quote Originally Posted by easymeat View Post
    ok so as far as the set size goes does it make any difference to the size as far as server goes? I thought I read somewhere that when you spawn stuff it makes server lag so would smaller be better? myth or fact?


    that does make sense to me, I always wondered what those [1] [2] [3] was for...lol.cool as hell now I can really fool around.
    It actually makes no difference. It defines a collection of three-dimensional ranges totalling six integers. The value of any of the six numbers doesn't make a calculation with it any slower or faster.
    Computers simply don't work that way. Increasing the setsize can have one side-effect that can increase collision calculations. If the setsize is larger, it has more chance to touch or collide with the
    setsize of another object. If your trigger only operates under the map, then those calculations will already be minimal.

    Quote Originally Posted by RyBack
    bboxes can be easily determined by a smart way i used to do in the past

    1. open MOHAA Radiant
    2. load the map , http://www.ausgamers.com/files/downl...urce-map-files
    3. make a trigger , Right Click > trigger > trigger_multiple
    now move the trigger anywhere in the map and set it's by click'ndrag outside the trigger
    If you want to find out the setsize of an object, there's this excellent script Elgan wrote that does it for you:
    Code:
    GetBBox:
    
        local.fwd = waitthread getbound 1 ( 1 0 0 )
        local.bwd = waitthread getbound 0 ( 1 0 0 )
    
    
        local.right = waitthread getbound 1 ( 0 1 0 )
        local.left = waitthread getbound 0 ( 0 1 0 )
    
    
        local.up = waitthread getbound 1 ( 0 0 1 )
        local.down = waitthread getbound 0 ( 0 0 1 )
            
        local.BBox[0] = ( -local.bwd -local.left -local.down )
        local.BBox[1] = ( local.fwd local.right local.up )
    
    
    end local.BBox
    
    
    getbound local.dir local.vector local.model:
    
    
        if(!local.model)
        {
            local.model = self
        }
    
    
        local.item = spawn script_origin origin local.model.origin
        local.item.angles = local.model.angles
        local.item setsize ( 0 0 0 ) ( 0 0 0 )
    
    
        for(local.i = 0;local.item istouching local.model; local.i++)
        {
            if(local.dir == 1)
            {
                local.item.origin += local.vector * 1
            }
            else
            {
                local.item.origin -= local.vector * 1
            }
        }    
    
    
        local.item delete
        local.i = ( local.i * local.model.scale + 6) - 11.5
    
    
    end local.i
    Quote Originally Posted by James
    So if that is a constant in all levels...
    if there is a way to get the "z" value of that variable (local.orb)
    and then just setsize -10
    No, that is not the case. It differs from map to map. In mohdm2 for example, one side of the map is lower than the other including their invisible floors so you're essentially forced to use two triggers.
    Also getmins and getmaxs are spearhead commands. Elgan's script is the way it is done in MoHAA.
    Last edited by Sor; December 27th, 2014 at 08:20 AM.
    Morpheus Script (MoH) => You try to shoot yourself in the foot only to discover that MorpheusScript already shot your foot for you.

  4. #24
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,566

    Default

    damn , elgan did it again , where do u guyz get these ideas


    but i don't understand how this line works :
    Code:
        local.i = ( local.i * local.model.scale + 6) - 11.5
    why + 6 & - 11.5 ?
    Last edited by RyBack; December 27th, 2014 at 08:34 AM.

  5. #25
    Developer Sor's Avatar
    Join Date
    Aug 2010
    Location
    The Medieval City of Bruges
    Posts
    747

    Default

    By thinking outside of the box (pun intended)
    Morpheus Script (MoH) => You try to shoot yourself in the foot only to discover that MorpheusScript already shot your foot for you.

  6. #26
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,566

    Default

    lol xD

  7. #27
    Developer Sor's Avatar
    Join Date
    Aug 2010
    Location
    The Medieval City of Bruges
    Posts
    747

    Default

    Quote Originally Posted by RyBack View Post
    damn , elgan did it again , where do u guyz get these ideas


    but i don't understand how this line works :
    Code:
        local.i = ( local.i * local.model.scale + 6) - 11.5
    why + 6 & - 11.5 ?
    Hm.. good point. I'm not sure myself but I think I misinterpreted what this code actually does.

    If Elgan's is multiplying by the scale of the object then he's not trying to find out what the setsize is, rather what the setsize should be to encompass the entire object.
    Scaling an object does not scale its setsize. I assume these 'magic' numbers got him the best approximation. So removing this line should get you the actual setsize.

    It probably didn't occur to him he could replace them with -5.5
    Last edited by Sor; December 27th, 2014 at 08:53 AM.
    Morpheus Script (MoH) => You try to shoot yourself in the foot only to discover that MorpheusScript already shot your foot for you.

  8. #28

    Default

    ok all my triggers are either under maps or above roofs, I did all the TDM maps, when I was playing the idjits was going nuts, so I figured I do 2 things fix it so they can't get under or on roofs, and learn some new stuff I did both.
    And dm2 did get 2 triggers under map and 3 above map, tricky part was figuring out how high to put them so you can still jump, or how low so you can still walk on ground, dm3 was a major pain.
    After I got the triggers set I remove the models (orb) figured didn't need that in there anymore.

    what does this work? local.orb svflags "+broadcast" //avoid lag by preventing status updates of this object and would it help on triggers? or other objects besides orbs?

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •